/*
 * @Author: 肖芬芳 1911683843@qq.com
 * @Date: 2022-11-17 11:40:09
 * @LastEditors: 肖芬芳 1911683843@qq.com
 * @LastEditTime: 2022-11-30 14:52:59
 * @FilePath: \blog\src\views\admin\home\api\logoutServiceApi.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { ServerResponse } from '@/util/base/ServerResponse'
import { Request } from '@/util/http/axios'
import LogoutForm from '../params/logout'
import MpForm from '../params/modifyPassword'

export default class LogoutServiceApi {
  // 退出登陆
  async logout (LogoutForm: LogoutForm): Promise<ServerResponse<any>> {
    const res = await Request.post<ServerResponse<any>, LogoutForm>(
      '/logout',
      LogoutForm)
    return res.data.code
  }

  async modifyPassword (mpForm: MpForm): Promise<ServerResponse<any>> {
    const res = await Request.post<ServerResponse<any>, MpForm>(
      '/modifyPassword',
      mpForm)
    return res.data.code
  }
}
